package com.csu.backmanagesys.Service.impl;

import com.csu.backmanagesys.Domain.Inventory;
import com.csu.backmanagesys.Mapper.InventoryMapper;
import com.csu.backmanagesys.Service.InventoryService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InventoryServiceImpl implements InventoryService {

    @Resource
    private InventoryMapper InventoryMapper;

    @Override
    public List<Inventory> selectInventory() {
        return InventoryMapper.selectInventory();
    }
    @Override
    public Inventory selectInventory(String id){
         return InventoryMapper.selectInventory(id);
    };

    @Override
    public void updateInventory(
            String itemId,
            int qty
    ){
        InventoryMapper.updateInventory(itemId,qty);
    };

    @Override
    public void deleteInventory(String itemId){
        InventoryMapper.deleteInventory(itemId);
    };

    @Override
    public  void insertInventory(
            String itemId,
            int qty
    ){
        InventoryMapper.insertInventory(itemId,qty);
    };



}
